package com.zc.tools.motionwelder;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class Graphics {

	public static void drawRegion(SpriteBatch batch, Sprite img,
			int clipX, int clipY, int clipWidth, int clipHeight, int posX,
			int posY, int orientation, float rotation) {
		switch (orientation) {
		case 0:
			batch.draw(img, posX, posY, 0, 0, clipWidth, clipHeight, 1f, 1f, 0);
			break;
		case 4:
			img.flip(true, false);
			batch.draw(img, posX, posY, 0, 0, clipWidth, clipHeight, 1, 1, 0);
			break;
		}
	}
}
